<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="format-detection" content="email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/mui.min.css">
    <link rel="stylesheet" href="css/search.css">
    <script src="js/vue.js"></script>
    <script src="js/axios.js"></script>
    <title>搜索名片</title>
</head>

<body>
<div id="app">
<header class="mui-bar mui-bar-nav head">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <input type="text" name="text" placeholder="名片搜索" v-model="datas"  @input="getlist">
</header>
<main>
    <div class="mui-content main">
        <div class="cont" v-for="ti in swip">
            <a @click="url(ti.id)" class="cont-top">
                <dl>
                    <dt>
                        <span>公司名称：</span>
                        <span>{{ti.title}}</span>
                    </dt>
                    <dd>
                        <p>主营：{{ti.major}}</p>
                    </dd>
                </dl>
                <img src="images/icon_more1.png" alt="">
            </a>
            <dl class="cont-bot">
                <dt>
                    <img src="images/icon_eye.png" alt="">
                    <span>{{ti.browse}}</span>
                </dt>
                <dd>
                    <img src="images/icon_star.png" alt="">
                    <span>{{ti.collection}}</span>
                </dd>
            </dl>
        </div>
        
    </div>
</main>
</div>
<script src="js/mui.min.js"></script>
<script type="text/javascript" charset="utf-8">
const API_PROXY = 'https://bird.ioliu.cn/v1/?url='
        new Vue({
            el: '#app',
            data: {
                datas:'',//输入的搜索名
                swip:'',//获取的数据
            },
            methods: {
                getlist() {
                    axios.post(API_PROXY + 'mingpian.32one.top/Index/Index/searchCard',`title=${this.datas}`)
                        .then(res => {
                            console.log(res.data.data)
                            this.swip=res.data.data;
                        }, err => {
                            console.log(err);
                        })
                },
                url(id){
					location.href="xiangqing.html?id="+id;
				}
            }
        })

</script>
</body>

</html>